from PyQt5.QtWidgets import QApplication, QWidget, QLabel

from PyQt5.QtGui import QIcon, QMovie

from PyQt5.QtCore import Qt

import sys


class M_Win(QWidget):
    def __init__(self):
        super().__init__()
        self.label = QLabel(self)
        self.m_ui()

    def m_ui(self):
        self.resize(950, 200)
        self.setWindowTitle("加载gif动画")
        self.label_01()

    def label_01(self):
        self.label.setToolTip("这是一个标签")
        self.m_movie()

    def m_movie(self):
        movie = QMovie("./flash2647.fla")
        self.label.setMovie(movie)
        movie.start()


if __name__ == "__main__":
    app = QApplication(sys.argv)
    win = M_Win()
    win.show()
    sys.exit(app.exec_())
